<div class="container">
    <div class="crumbs">
        <ul id="breadcrumbs" class="breadcrumb">
            <li><i class="icon-home"></i> <a href="layout.php">Dashboard</a></li>
        </ul>
    </div>
    <div class="page-header">
        <div class="page-title"><h3>Dashboard</h3> <span>Good morning, <b><?php echo $user_name; ?></b>!</span></div>
    </div>
    <div class="col-sm-6 col-md-3 hidden-xs">
        <div class="statbox widget box box-shadow">
            <div class="widget-content">
                <div class="visual yellow"><i class="icon-dollar"></i></div>
                <div class="title">Total Profit</div>
                <div class="value">$<?php echo round($count_profit, 2); ?></div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-md-3 hidden-xs">
        <div class="statbox widget box box-shadow">
            <div class="widget-content">
                <div class="visual yellow"><i class="icon-dollar"></i></div>
                <div class="title">Today's Profit</div>
                <div class="value">$<?php echo round($count_today_profit, 2); ?></div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-md-3 hidden-xs">
        <div class="statbox widget box box-shadow">
            <div class="widget-content">
                <div class="visual yellow"><i class="icon-dollar"></i></div>
                <div class="title">This month's Profit</div>
                <div class="value">$<?php echo round($count_month_profit, 2); ?></div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-md-3 hidden-xs">
        <div class="statbox widget box box-shadow">
            <div class="widget-content">
                <div class="visual yellow"><i class="icon-dollar"></i></div>
                <div class="title">This year's Profit</div>
                <div class="value">$<?php echo round($count_year_profit, 2); ?></div>
            </div>
        </div>
    </div>
    <div class="col-sm-6 col-md-3">
        <div class="statbox widget box box-shadow">
            <div class="widget-content">
                <div class="visual cyan">
                    <div class="statbox-sparkline">30,20,15,30,22,25,26,30,27</div>
                </div>
                <div class="title">Authors</div>
                <div class="value"><?php echo $count_author; ?></div>
                <a class="more" href="http://localhost/admin/user">View More <i
                        class="pull-right icon-angle-right"></i></a></div>
        </div>
    </div>
    <div class="col-sm-6 col-md-3">
        <div class="statbox widget box box-shadow">
            <div class="widget-content">
                <div class="visual green">
                    <div class="statbox-sparkline">20,30,30,29,22,15,20,30,32</div>
                </div>
                <div class="title">Products</div>
                <div class="value"><?php echo $count_product; ?></div>
                <a class="more" href="http://localhost/admin/product/all">View More <i
                        class="pull-right icon-angle-right"></i></a></div>
        </div>
    </div>

</div>
<div id="chart1" style="width:80%; height:400px;"></div>
<script>
    var year = new Date().getFullYear();
    var chart1 = new Highcharts.Chart({
        chart: {
            renderTo: 'chart1',
            type: 'column'
        },
        title: {
            text: 'Income in ' + year
        },
        xAxis: {
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
        },
        yAxis: {
            title: {
                text: 'Income ($)'
            }
        },
        series: [
            {
                name: 'Income',
                data: [<?php echo $income; ?>]
            }
        ]
    });
</script>
